package com.cat.recruit.bean.request;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.util.Date;

@Data
@Schema(description = "更新预约时间段请求参数")
public class UpdateAppointmentSlotRequest {
    /**
     * 主键
     */
    @Schema(description = "主键", example = "1")
    @NotNull
    private Integer id;

    /**
     * 考核类型
     */
    @NotEmpty
    @Schema(description = "考核类型", example = "一面")
    private String accessType;

    /**
     * 考核方向
     */
    @NotEmpty
    @Schema(description = "考核方向", example = "前端")
    private String direction;

    /**
     * 预约日期
     */
    @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "日期格式无效，应为 yyyy-MM-dd")
    @Schema(description = "预约日期", example = "2021-09-10")
    private String appointmentDate;

    /**
     * 开始时间
     */
    @Pattern(regexp = "^([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$", message = "开始时间格式无效，应为 HH:mm:ss")
    @Schema(description = "开始时间", example = "10:00:00")
    private String startTime;

    /**
     * 结束时间
     */
    @Pattern(regexp = "^([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$", message = "结束时间格式无效，应为 HH:mm:ss")
    @Schema(description = "结束时间", example = "12:00:00")
    private String endTime;

    /**
     * 预约人数上限
     */
    @NotNull
    @Schema(description = "预约人数上限", example = "10")
    private Integer capacity;

}
